#ifndef DYNAMICVIDEOITEM_H
#define DYNAMICVIDEOITEM_H

#include <QWidget>
#include<QPropertyAnimation>
#include<QLabel>
#include<QTimer>
#include<QGraphicsOpacityEffect>
namespace Ui {
class dynamicvideoitem;
}

class dynamicvideoitem : public QWidget
{
    Q_OBJECT
public:  //视频基本信息
    QString sign1;
    QString sign2;
    QString sign3;
    QString imageaddress1=":/res/4.png";
    QString imageaddress2=":/res/default_image.png";
    QString imageaddress3=":/res/4.png";
    QString videoaddress1;
    QString videoaddress2;
    QString videoaddress3;
    int videoid1;
    int videoid2;
    int videoid3;
    int currentvideoid;
public:
    explicit dynamicvideoitem(QWidget *parent = nullptr);
    ~dynamicvideoitem();
    // QPropertyAnimation* p1;
    // QPropertyAnimation* p2;
    // QPropertyAnimation* p3;
    // QGraphicsOpacityEffect* ge1;
    // QGraphicsOpacityEffect* ge2;
    // QGraphicsOpacityEffect* ge3;
    QTimer* timer_convert=new QTimer(this);
    int convert_duration=1000;    //切屏频率
    int convert_time=0;
    int cur_image=0;
public:
    void init();   //创建动态视频项时要调用init()进行初始化
    void convertlabel();
    void changedotui(int curindex);
private slots:
    void on_nextpage_clicked();

    void on_frontppage_clicked();

private:
    Ui::dynamicvideoitem *ui;
};

#endif // DYNAMICVIDEOITEM_H
